package com.web.manager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.web.manager.pojo.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommentMapper extends BaseMapper<Comment> {

    @Select("select c.*,u.username,u.img from comment c left join login_user u on c.user_id=u.id  where c.article_id = #{articleId} order by id desc")
    List<Comment> findCommentDetail(@Param("articleId") Integer articleId);
}
